import axios from '@/util'; 

import type {
  JieSuoCiShuShengYuDto,
  yongHuFanKuiEntity,
  XieYiDto,
  UserEntity,
  CreateConfigEntity,
  SavedConfigEntity,
} from './typings';



/**
 * 查询用户剩余解锁次数 GET /api/user/jie-suo-ci-shu
 */
export async function get_api_user_jie_suo_ci_shu (
  options?: Record<string, any>,
): Promise<JieSuoCiShuShengYuDto> {
  return axios({
    method: 'GET',
    url: `/api/user/jie-suo-ci-shu`,
    ...(options || {}),
  })
}

/**
 *  POST /api/user/use-jie-suo
 */
export async function post_api_user_use_jie_suo (
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'POST',
    url: `/api/user/use-jie-suo`,
    ...(options || {}),
  })
}

/**
 * 创建用户反馈 POST /api/user/createYongHuFanKui
 */
export async function post_api_user_createyonghufankui (
  data: {
    /** email */
    email?: string;
    /** miaoShu */
    miaoShu?: string;
    /** tuPianUrl */
    tuPianUrl?: string;
  },
  options?: Record<string, any>,
): Promise<yongHuFanKuiEntity> {
  return axios({
    method: 'POST',
    url: `/api/user/createYongHuFanKui`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 获取用户反馈 GET /api/user/getYongHuFanKui
 */
export async function get_api_user_getyonghufankui (
  params: {
    /** 显示页数 */
    page: any;
    /** 每页显示条数 */
    size: any;
    /**  */
    email?: any;
  },
  options?: Record<string, any>,
): Promise<yongHuFanKuiEntity> {
  return axios({
    method: 'GET',
    url: `/api/user/getYongHuFanKui`,
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/**
 * 创建用户协议 POST /api/user/chuangJianXiuGaiXieYi
 */
export async function post_api_user_chuangjianxiugaixieyi (
  data: {
    /**  */
    yongHuXieYi?: string;
    /**  */
    yinSiZhengCe?: string;
    /**  */
    chongZhiGuiZe?: string;
    /**  */
    zhuXiaoGuiZe?: string;
  },
  options?: Record<string, any>,
): Promise<XieYiDto> {
  return axios({
    method: 'POST',
    url: `/api/user/chuangJianXiuGaiXieYi`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 获取用户协议 GET /api/user/huoQuXieYi
 */
export async function get_api_user_huoquxieyi (
  options?: Record<string, any>,
): Promise<XieYiDto> {
  return axios({
    method: 'GET',
    url: `/api/user/huoQuXieYi`,
    ...(options || {}),
  })
}

/**
 * 删除用户 DELETE /api/user/deleteAccount
 */
export async function delete_api_user_deleteaccount (
  data: {
    /**  */
    account?: string;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'DELETE',
    url: `/api/user/deleteAccount`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 查询用户列表 GET /api/user/list
 */
export async function get_api_user_list (
  params: {
    /** 显示页数 */
    page: any;
    /** 每页显示条数 */
    size: any;
    /** 账号模糊搜索 */
    account?: any;
    /** 按账号状态查询用户 */
    status?: any;
    /** 拥有角色id */
    roleId?: any;
    /** 当 roleId 不为空时有效，查询用户是否有当前权限 0-无当前角色 1-有当前角色 */
    hasCurrRole?: any;
    /** 部门id */
    deptId?: any;
    /** 当 deptId 不为空时有效，查询用户是否在当前部门 0-不在当前部门 1-在当前部门 */
    hasCurrDept?: any;
    /** 是否申请删除账号 */
    isWaitingDelete?: any;
  },
  options?: Record<string, any>,
): Promise<UserEntity> {
  return axios({
    method: 'GET',
    url: `/api/user/list`,
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/**
 * 根据id查询用户信息 GET /api/user/one/info
 */
export async function get_api_user_one_info (
  params: {
    /**  */
    id: any;
  },
  options?: Record<string, any>,
): Promise<UserEntity> {
  return axios({
    method: 'GET',
    url: `/api/user/one/info`,
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/**
 * 根据token查询用户背景图 GET /api/user/one/bgImg
 */
export async function get_api_user_one_bgimg (
  params: {
    /**  */
    token: any;
  },
  options?: Record<string, any>,
): Promise<UserEntity> {
  return axios({
    method: 'GET',
    url: `/api/user/one/bgImg`,
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/**
 * 查询用户角色id集合 GET /api/user/{id}/role
 */
export async function get_api_user__id__role (
  pathVars: {
    /**  */
    id: any;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'GET',
    url: `/api/user/${pathVars.id}/role`,
    ...(options || {}),
  })
}

/**
 * 角色添加/取消关联用户 POST /api/user/role/update
 */
export async function post_api_user_role_update (
  data: {
    /** user id 集合 */
    userIds?: string__;
    /** 角色 roleId */
    roleId?: string;
    /** create/cancel */
    type?: __create_____cancel__;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'POST',
    url: `/api/user/role/update`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 更新用户信息 PUT /api/user
 */
export async function put_api_user (
  data: {
    /** 用户编码 */
    id?: string;
    /** 所属状态: 1-有效，0-禁用 */
    status?: number;
    /** 手机号 */
    phoneNum?: string;
    /** 用户名 */
    username?: string;
    /** 密码 */
    password?: string;
    /** 邮箱 */
    email?: string;
    /** 头像 */
    avatar?: string;
    /** 角色 id 集合 */
    roleIds?: string__;
    /** 用户钻石 */
    diamond?: number;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'PUT',
    url: `/api/user`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 更新前端用户信息 PUT /api/user/qianDuanUpdateUserInfo
 */
export async function put_api_user_qianduanupdateuserinfo (
  data: {
    /** 用户钻石 */
    diamond?: number;
    /** 邮箱 */
    email?: string;
    /**  */
    account?: string;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'PUT',
    url: `/api/user/qianDuanUpdateUserInfo`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 更改用户可用状态 PUT /api/user/status/change
 */
export async function put_api_user_status_change (
  data: {
    /** 用户编码 */
    id?: string;
    /** 所属状态: 1-有效，0-禁用 */
    status?: number;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'PUT',
    url: `/api/user/status/change`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 重置用户密码 PUT /api/user/password/reset/{userId}
 */
export async function put_api_user_password_reset__userid_ (
  pathVars: {
    /**  */
    userId: any;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'PUT',
    url: `/api/user/password/reset/${pathVars.userId}`,
    ...(options || {}),
  })
}

/**
 * 重置用户密码 PUT /api/user/password/qianDuanDengLuUpdatePassword
 */
export async function put_api_user_password_qianduandengluupdatepassword (
  data: {
    /** 密码 */
    newPassword?: string;
    /** 密码 */
    originalPassword?: string;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'PUT',
    url: `/api/user/password/qianDuanDengLuUpdatePassword`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 修改用户密码 PUT /api/user/password/qianDuanWeiDengLuReset
 */
export async function put_api_user_password_qianduanweidenglureset (
  data: {
    /** 密码 */
    password?: string;
    /** 密码 */
    email?: string;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'PUT',
    url: `/api/user/password/qianDuanWeiDengLuReset`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * excel 批量导入用户 POST /api/user/import
 */
export async function post_api_user_import (
  data: {
    /**  */
    unknownParam?: any;
  },
  options?: Record<string, any>,
): Promise<UserEntity> {
  return axios({
    method: 'POST',
    url: `/api/user/import`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 申请删除账号 POST /api/user/apply-delete-by-email
 */
export async function post_api_user_apply_delete_by_email (
  options?: Record<string, any>,
): Promise<UserEntity> {
  return axios({
    method: 'POST',
    url: `/api/user/apply-delete-by-email`,
    ...(options || {}),
  })
}

/**
 * 创建用户配置 POST /api/user/createConfig
 */
export async function post_api_user_createconfig (
  data: {
    /**  */
    genre?: string;
    /** account */
    account?: string;
    /** plotValue */
    plot?: string__;
    /** placeValue */
    place?: string;
    /** identityValue */
    lover_identity?: string;
    /** calledValue */
    lover_name?: string;
    /** personalityValue */
    lover_personality?: string;
    /** nameValue */
    my_name?: string;
    /** raceValue */
    lover_race?: string;
    /** voiceValue */
    storytelling_voice?: string;
    /** sliderValue */
    proportion?: number;
    /** title */
    title?: string;
  },
  options?: Record<string, any>,
): Promise<CreateConfigEntity> {
  return axios({
    method: 'POST',
    url: `/api/user/createConfig`,
    data: {
      ...data,
    },
    ...(options || {}),
  })
}

/**
 * 查询用户保存配置 GET /api/user/getConfigList
 */
export async function get_api_user_getconfiglist (
  options?: Record<string, any>,
): Promise<SavedConfigEntity> {
  return axios({
    method: 'GET',
    url: `/api/user/getConfigList`,
    ...(options || {}),
  })
}

/**
 * 删除用户保存的配置 DELETE /api/user/config/{id}
 */
export async function delete_api_user_config__id_ (
  pathVars: {
    /**  */
    id: any;
  },
  options?: Record<string, any>,
): Promise<any> {
  return axios({
    method: 'DELETE',
    url: `/api/user/config/${pathVars.id}`,
    ...(options || {}),
  })
}
